<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   
</body>
<script>
    var userList = ["zhangsan","lisi","wangwu"];
    /**
     * arr.shift()删除数组的第一个元素，数组的长度减1
     * 返回值为被删除的数组元素
     */
    /* var result = userList.shift();
    while(userList.length>0){
        userList.shift();
    }
    console.log(userList);
     */
    var result1 = userList.pop();
    console.log(result1);
</script>
</html>